using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;

public class EnemyState
{
    protected EnemyStateMachine stateMachine;
    protected Enemy enemyBase;
    protected bool triggerCalled;
    protected string animBoolName;
    protected float stateTimer;
    public EnemyState(Enemy _enemybase,EnemyStateMachine _stateMachine,string _animBoolName)
    {
        this.enemyBase= _enemybase;
        this.stateMachine= _stateMachine;
        this.animBoolName= _animBoolName; 

    }
    public virtual void Update()
    {
        stateTimer -= Time.deltaTime;
    }
    public virtual void Enter()
    {
        triggerCalled = false;
        enemyBase.anim.SetBool(animBoolName, true);
    }
    public virtual void Exit()
    {
        enemyBase.anim.SetBool(animBoolName, false);
        enemyBase.AssignLastAnimName(animBoolName);
    }
    public virtual void AnimationTrigger()
    {
        triggerCalled = true;
    }

    
}
